package main

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"testGin/config"
	"testGin/router"
)



func main() {
	config := (&config.Config{}).InIt()
	r := gin.New()
	//加载模板
	r.LoadHTMLGlob("templates/**/**/*")
	//设置标签
	r.Delims("{[{", "}]}")
    //设置静态文件
	r.Static("/static", "./static")
	//网站图标
	r.StaticFile("/favicon.ico", "./favicon.ico")
    //加载路由
	router.Router(r);
	r.Run(":"+fmt.Sprintf("%d",config.System.Port)) // listen and serve on 0.0.0.0:8080
}

